#ifndef DHT22_H
#define DHT22_H

#include <stdint.h>

typedef struct {
    float temperature;
    float humidity;
} dht22_data_t;

/**
 * @brief 读取DHT22传感器数据
 * @param[out] temperature 温度值
 * @param[out] humidity 湿度值
 * @return 0：成功，非0：失败
 */
int dht22_read(float *temperature, float *humidity);

#endif /* DHT22_H */
